// defines font family and standard font size across the whole theme
// em is preferred for better support for text scaling
stage {
  @include type(body2);

  font-family: $font-family;
  color: $on-surface;
}
.cinnamon-link {
  color: $primary;
  font-style: italic;
  &:hover {
    color: $primary;
  }
}
.label-shadow {
  color: transparent;
}
// themeing for various standard elements
StScrollBar {
  padding: 0px;
  StButton {
    &#vhandle, &#hhandle {
      background-color: disabled($on-surface);
      border-radius: 100px;
      margin: 4px;
      &:hover {
        background-color: hint($on-surface);
      }
    }
  }
  StBin#trough {
    margin: 4px;
    border-radius: 100px;
    background-color: divider($on-surface);
  }
}
StScrollView {
  &.vfade {
    -st-vfade-offset: 32px;
  }
  &.hfade {
    -st-hfade-offset: 32px;
  }
  StScrollBar {
    min-width: 16px;
    min-height: 16px;
  }
}
.separator {
  @extend %separator-shared;
}
.slider {
  @extend %slider-shared;
}
#Tooltip {
  @include type(caption);
  
  padding: 6px 8px;
  color: $on-tooltip;
  text-align: center;
  border-radius: $corner-radius;
  background-color: $tooltip;
}
// applet menus. Note that cinnamon versions before 3.2 uses deprecated styles
// .popup-menu and .popup-menu-boxpointer. These are excluded as it is not possible
// due to other upstream changes to create a universal cinnamon theme that supports pre and post cinnamon 3.2
.menu {
  @extend %menu-shared;
  min-width: 100px;
  margin: 4px;
}
// new style-classes for alternative stock menu
.menu-top-box {
  spacing: 5px;
}
.menu-systembuttons-box {
  padding: 10px;
}
.popup-sub-menu {
  background-color: entry-fill($on-surface);
}
.popup-menu-arrow {
  icon-size: 1.14em;
}
// scale view right click menu
.popup-combo-menu {
  @extend %menu-shared;
  padding: 8px 0;
}
.popup-menu-content{
  padding: 8px 0;
}

// individual menu entries are themed here
.popup-menu-item {
  padding: 0.4em 16px;
  spacing: 8px;
  transition-duration: $duration;
  &:active {
    background-color: overlay("hover", $on-surface);
    color: $on-surface;
    transition-duration: 0ms;
  }
  &:insensitive { color: disabled($on-surface); }
  }
.popup-image-menu-item {
  color: hint($on-surface);
}
.popup-combobox-item {
  padding: 0.4em 16px;
}
// sliders and separators in menus
.popup-separator-menu-item {
  @extend %separator-shared;
}
.popup-slider-menu-item {
  @extend %slider-shared;
}
.popup-device-menu-item {
  spacing: .5em;
}
.popup-inactive-menu-item {
  color: $on-surface;
  &:insensitive { color: disabled($on-surface); }
}
.popup-subtitle-menu-item {
  @include type(subtitle2);
}
.popup-menu-icon {
  icon-size: 1.14em;
}
.popup-menu-item-dot {
}
.popup-submenu-menu-item:open {
}
.popup-alternating-menu-item:alternate {
  @include type(subtitle2);
}
// toggles in menus
.toggle-switch {
   width: 40px;
   height: 20px;
}
.toggle-switch-us, .toggle-switch-intl {
  background-image: url(assets/toggle-off.svg);
  &:checked {
    background-image: url(assets/toggle-on.svg);
  }
}
.nm-menu-item-icons {
  spacing: .5em;
  icon-size: 1.14em;
}
// panels can be on any side of the screen
// some panel item theming is specific to panel orientation and is included in this section
// each panel is also split into three zones
// dnd is for panel edit mode
// dummy is for adding or moving panels
#panel {
  color: hint($on-titlebar);
  background-color: $scrim;
  height: 2.5em;
  width: 3.2em;
  &:highlight {
    background-color: stroke($on-titlebar);
  }
}
.panel-dummy {
  background-color: rgba(255, 0, 0, 0.6);
  &:entered {
    background-color: rgba(0, 255, 0, 0.6);
  }
}
.panelLeft {
  spacing: 4px;
  &:dnd {
    background-color: rgba(255, 0, 0, 0.6);
  }
  &:ltr {
    padding-right: 4px;
  }
  &:rtl {
    padding-left: 4px;
  }
  &.vertical {
    padding: 0;
    &:dnd {
    }
  }
}
.panelCenter {
  spacing: 4px;
  &:dnd {
    background-color: rgba(0, 255, 0, 0.6);
  }
  &.vertical {
    padding-left: 0;
    padding-right: 0;
    &:dnd {
    }
  }
}
.panelRight {
  spacing: 4px;
  &:dnd {
    background-color: rgba(0, 0, 255, 0.6);
  }
  &:ltr {
    padding-left: 0;
    spacing: 0;
  }
  &:rtl {
    padding-right: 0;
    spacing: 0;
  }
  &.vertical {
    padding: 0;
    &:dnd {
    }
  }
}
// orientation specific panel-item theming is defined here
// non orientation specific theming for panel-items is defined later in the stylesheet
.panel-top {
  .window-list-item-box {
    &:hover {
      box-shadow: 0 3px 0 0 $primary inset;
    }
    &:active, &:checked, &:focus {
      &:hover {
        box-shadow: 0 3px 0 0 $primary inset;
      }
    }
  }
  .grouped-window-list-item-box {
    &:hover {
      box-shadow: 0 3px 0 0 $primary inset;
    }
    &:active, &:checked {
      &:hover {
        box-shadow: 0 3px 0 0 $primary inset;
      }
    }
    &:focus {
      &:hover {
        box-shadow: 0 3px 0 0 $primary inset;
      }
    }
  }
  .grouped-window-list-badge {
    margin-top: 2px;
  }
  .workspace-switcher, .workspace-graph, .workspace-button {
    padding: 1px 4px;
  }
  .workspace-graph, .workspace-button {;
    &:hover {
      box-shadow: 0 3px 0 0 $primary inset;
    }
  }
  .applet-box {
    padding: 0 4px;
    &:hover {
      box-shadow: 0 3px 0 0 $primary inset;
    }
  }
  .applet-label {
  }
  .panel-launchers .launcher:hover {
    box-shadow: 0 3px 0 0 $primary inset;
  }
  .applet-separator {
    padding: 3px 4px;
  }
  .systray:hover {
    box-shadow: 0 4px 0 0 $primary inset;
  }
}
.panel-bottom {
  .window-list-item-box {
    &:hover {
      box-shadow: 0 -3px 0 0 $primary inset;
    }
    &:active, &:checked, &:focus {
      &:hover {
        box-shadow: 0 -3px 0 0 $primary inset;
      }
    }
  }
  .grouped-window-list-item-box {
    &:hover {
      box-shadow: 0 -3px 0 0 $primary inset;
    }
    &:active, &:checked {
      &:hover {
        box-shadow: 0 -3px 0 0 $primary inset;
      }
    }
    &:focus {
      &:hover {
        box-shadow: 0 -3px 0 0 $primary inset;
      }
    }
  }
  .workspace-switcher, .workspace-graph, .workspace-button {
    padding: 1px 4px;
  }
  .workspace-graph, .workspace-button {;
    &:hover {
      box-shadow: 0 -3px 0 0 $primary inset;
    }
  }
  .applet-box {
    padding: 0 4px;
    &:hover {
      box-shadow: 0 -3px 0 0 $primary inset;
    }
  }
  .applet-label {
  }
  .panel-launchers .launcher:hover {
    box-shadow: 0 -3px 0 0 $primary inset;
  }
  .applet-separator {
    padding: 3px 4px;
  }
  .systray:hover {
    box-shadow: 0 4px 0 0 $primary inset;
  }
}
.panel-left {
  .window-list-item-box {
    &:hover {
      box-shadow: 3px 0 0 0 $primary inset;
    }
    &:active, &:checked, &:focus {
      &:hover {
        box-shadow: 3px 0 0 0 $primary inset;
      }
    }
  }
  .grouped-window-list-item-box {
    &:hover {
      box-shadow: 3px 0 0 0 $primary inset;
    }
    &:active, &:checked {
      &:hover {
        box-shadow: 3px 0 0 0 $primary inset;
      }
    }
    &:focus {
      &:hover {
        box-shadow: 3px 0 0 0 $primary inset;
      }
    }
  }
  .grouped-window-list-badge {
    margin-left: 2px;
  }
  .workspace-switcher, .workspace-graph, .workspace-button {
    padding: 4px 1px;
    min-height: 1.2em;
  }
  .workspace-graph, .workspace-button {;
    &:hover {
      box-shadow: 3px 0 0 0 $primary inset;
    }
  }
  .applet-box {
    padding: 4px 0;
    &:hover {
      box-shadow: 3px 0 0 0 $primary inset;
    }
  }
  .applet-label {
  }
  .panel-launchers .launcher:hover {
    box-shadow: 3px 0 0 0 $primary inset;
  }
  .applet-separator {
    padding: 4px 3px;
  }
  .systray:hover {
    box-shadow: 4px 0 0 0 $primary inset;
  }
}
.panel-right {
    .window-list-item-box {
    &:hover {
      box-shadow: -3px 0 0 0 $primary inset;
    }
    &:active, &:checked, &:focus {
      &:hover {
        box-shadow: -3px 0 0 0 $primary inset;
      }
    }
  }
  .grouped-window-list-item-box {
    &:hover {
      box-shadow: -3px 0 0 0 $primary inset;
    }
    &:active, &:checked {
      &:hover {
        box-shadow: -3px 0 0 0 $primary inset;
      }
    }
    &:focus {
      &:hover {
        box-shadow: -3px 0 0 0 $primary inset;
      }
    }
  }
  .workspace-switcher, .workspace-graph, .workspace-button {
    padding: 4px 1px;
    min-height: 1.2em;
  }
  .workspace-graph, .workspace-button {;
    &:hover {
      box-shadow: -3px 0 0 0 $primary inset;
    }
  }
  .applet-box {
    padding: 4px 0;
    &:hover {
      box-shadow: -3px 0 0 0 $primary inset;
    }
  }
  .applet-label {
  }
  .panel-launchers .launcher:hover {
    box-shadow: -3px 0 0 0 $primary inset;
  }
  .applet-separator {
    padding: 4px 3px;
  }
  .systray:hover {
    box-shadow: -4px 0 0 0 $primary inset;
  }
}
// keyboard layout applet
.panel-status-button {
  @include type(subtitle2);
  -natural-hpadding: 4px;
  -minimum-hpadding: 4px;
  color: hint($on-titlebar);
  &:hover {
    color: $on-titlebar;
  }
}
// used by power applet to warn of low battery
.system-status-icon {
  icon-size: 1.14em;
  padding: 0;
  spacing: 0;
  &.warning {
    color: $warning;
  }
  &.error {
    color: $error;
  }
}
// a non feature - not worth themeing
.panel-corner {
  &:active {
  }
  &:overview {
  }
  &:focus {
  }
}
// expo & scale view section
#overview {
  spacing: 12px;
}
.overview-empty-placeholder {
    @extend %osd-info-workspace-shared;
    
}
.window-caption {
  @include type(caption);

  background-color: rgba(0, 0, 0, 0.01);
  color: hint($on-titlebar);
  padding: 4px 6px;
  text-align: center;
  height: 1.5em;
  -cinnamon-caption-spacing: 12px;
  &#selected, &:focus {
    color: $on-titlebar;
    box-shadow: 0 -3px 0 0 $primary inset;
  }
}
.workspace-controls {
  visible-height: 32px;
}
.workspace-thumbnails-background {
  color: hint($on-titlebar);
  background-color: fill($on-dark);
  border: none;
  padding: 8px;
  border-radius: $corner-radius 0 0 $corner-radius;
  &:rtl { border-radius: 0 $corner-radius $corner-radius 0;}
}
.workspace-thumbnails {
  spacing: 32px;
}
.workspace-add-button {
  background-image: url(assets/add-workspace.svg);
  height: 200px;
  width: 35px;
  transition-duration: shorter_duration;
  &:hover {
    background-image: url(assets/add-workspace-hover.svg);
  }
  &:active {
    background-image: url(assets/add-workspace-active.svg);
  }
}
.workspace-close-button, .window-close {
  background-image: url(assets/close-window.svg);
  height: 32px;
  width: 32px;
  -cinnamon-close-overlap: 20px;
  &:rtl {
    -st-background-image-shadow: 2px 2px 6px rgba(0,0,0,0.5);
  }
}
.window-border {
    border: 1px solid divider($on-surface);
}
.window-close-area {
  background-image: url(assets/trash-icon.png);
  background-size: 100px;
  background-color: $scrim-alt;
  border: 1px solid divider($on-surface);
  border-bottom-width: 0;
  border-radius: 20px 20px 0 0;
  height: 120px;
  width: 400px;
}
// this is OK with solid or transparent backgrounds
.expo-background {
  background-color: $scrim;
}
// this always looks better semi transparent
.workspace-overview-background-shade {
  background-color: $scrim;
}
.expo-workspace-thumbnail-frame {
  border: 1px solid divider($on-surface);
  &#active {
    border: 1px solid $primary;
  }
}
// dialog box for the cinnamon debug utility
#LookingGlassDialog {
  @extend %osd-panel-shared;

  spacing: 4px;
  padding: 8px;
}
// the calendar displayed by the calendar applet is a heavily modified menu and inherits from the .menu selectosr
// indivudual elements within the menu can be themed seperately with these selectors
.calendar {
  padding: 4px 8px;
  spacing-rows: 2px;
  spacing-columns: 4px;
}
// also covers the year label
.datemenu-date-label {
    @include type(headline6);

    height: $menuitem-size - 2px * 2;
    margin: 2px;
    padding: 6px 16px;
    border-radius: $corner-radius;
    color: $on-surface;
    text-align: center;
    &:focus { background-color: divider($on-surface) };
}
.calendar-month-label {
    @include type(subtitle2);

    height: $menuitem-size - 6px * 2;
    margin: 2px;
    padding: 6px 16px;
    border-radius: $corner-radius;
    color: $on-surface;
    text-align: center;
    &:focus { background-color: divider($on-surface) };
}
.calendar-change-month-back {
  @extend %calendar-shared;

  background-image: url(assets/calendar-arrow-left.svg);
  &:rtl {
    background-image: url(assets/calendar-arrow-right.svg);
  }
}
.calendar-change-month-forward {
  @extend %calendar-shared;

  background-image: url(assets/calendar-arrow-right.svg);
  &:rtl {
    background-image: url(assets/calendar-arrow-left.svg);
  }
}
.calendar-day-base {
  @include type(caption);

  text-align: center;
  width: $menuitem-size; height: $menuitem-size;
  padding: 0;
  margin: 2px;
  border-radius: 100px;
  &:hover,&:focus { background-color: stroke($on-titlebar); }
  &:active {
    color: $on-primary;
    background-color: $primary;
    border-color: transparent; 
  }
}
.calendar-week-number {
  @include type(caption);

  width: $menuitem-size - 7px; height: $menuitem-size;
  margin: 2px;
  padding: 0;
  border-radius: 100px;
  background-color: transparent;
  color: disabled($on-surface);
  text-align: center;
}
.calendar-day-heading  {
  @include type(caption);

  width: $menuitem-size; height: $menuitem-size - 7px;
  margin: 2px;
  padding: 0;
  border-radius: 100px;
  background-color: transparent;
  color: disabled($on-surface);
  text-align: center;
}
.calendar-day {
  border-width: 0;
}
.calendar-day-top { 
  border-top-width: 0; 
}
.calendar-day-left {
  border-left-width: 0; 
}
.calendar-work-day {
}
.calendar-nonwork-day {
  color: $on-surface;
}
.calendar-today {
  font-weight: bold;
  border: none;
}
.calendar-day-with-events {
  color: $primary;
  font-weight: normal;
  text-decoration: underline;
  background-image: none;
}
.calendar-other-month-day {
  color: disabled-hint($on-surface);
  opacity: 0.5;
}
.calendar-week-number {
  width: $menuitem-size; height: $menuitem-size - 7px;
  margin: 2px;
  padding: 7px 0 0;
  border-radius: 100px;
  background-color: transparent;
  color: disabled($on-surface);
  font-size: inherit;
  font-weight: bold;
  text-align: center;
}
// notification system
#notification {
  background-color: $surface;
  border-radius: $corner-radius;
  border: 1px solid divider($on-surface);
  padding: 8px;
  spacing-rows: 4px;
  spacing-columns: 8px;
  margin-from-right-edge-of-screen: 20px;
  width: 34em;
  color: $on-surface;
  box-shadow: $shadow-2;
  &.multi-line-notification {
    padding-bottom: 8px;
  }
  StEntry {
    @extend %dialog-entry-shared;
  }
  .url-highlighter {
    link-color: $primary;
  }
}
// min height 159px is required to avoid stretching/distortion of notification image
.notification-with-image {
  min-height: 159px;
  color: $on-surface;
}
#notification-scrollview {
  max-height: 10em;
  > {
    .top-shadow {
      height: 1em;
    }
    .bottom-shadow {
      height: 1em;
    }
  }
  &:ltr > StScrollBar {
    padding-left: 6px;
  }
  &:rtl > StScrollBar {
    padding-right: 6px;
  }
}
#notification-body {
  spacing: 4px;
}
#notification-actions {
  spacing: 8px;
}
.notification-button {
  @extend %button-shared;
}
.notification-icon-button {
  @extend %icon-button-shared;

  > StIcon {
    icon-size: 1.5em;
  }
}
// non 3D alt-tab options
#altTabPopup {
  padding: 8px;
  spacing: 16px;
}
.switcher-list {
  @extend %osd-panel-shared;

  transition-duration: $duration;
  .item-box {
    padding: 8px;
    border-radius: $corner-radius;
    &:selected {
      background-color: divider($on-surface);
    }
  }
  .thumbnail-box {
    padding: 2px;
    spacing: 4px;
  }
  .thumbnail {
    width:  256px
  }
  .separator {
    width: 1px;
    background: divider($on-surface);
  }
}
.switcher-list-item-container {
  spacing: 8px;
}
.thumbnail-scroll-gradient-left {
  background-gradient-direction: horizontal;
  background-gradient-start: rgba(51, 51, 51, 1.0);
  background-gradient-end: rgba(51, 51, 51, 0);
  border-radius: $corner-radius;
  border-radius-topright: 0;
  border-radius-bottomright: 0;
  width: 60px;
}
.thumbnail-scroll-gradient-right {
  background-gradient-direction: horizontal;
  background-gradient-start: rgba(51, 51, 51, 0);
  background-gradient-end: rgba(51, 51, 51, 1.0);
  border-radius: $corner-radius;
  border-radius-topleft: 0;
  border-radius-bottomleft: 0;
  width: 60px;
}
.switcher-arrow {
  border-color: rgba(0,0,0,0);
  color: hint($on-surface);
  &:highlighted {
    color: $on-surface;
  }
}
.switcher-preview-backdrop {
  background-color: $scrim;
}
// hot corners animation
.ripple-box {
  width: 104px;
  height: 104px;
  background-image: url(assets/corner-ripple.png);
  background-color: $primary;
  border-radius: 52px;
}
// on screen messages and input boxes
.modal-dialog {
	@extend %osd-panel-shared;

  padding: 16px 20px;
}
.modal-dialog-button-box {
  spacing: 16px;
}
.modal-dialog-button {
  @extend %button-shared;
}
.info-osd {
  @extend %osd-info-workspace-shared;
}
// run dialog (ALT-F2)
.run-dialog-label {
  color: hint($on-surface);
  padding-bottom: .4em;
}
.run-dialog-error-label {
  color: $error;
}
.run-dialog-error-box {
  padding-top: 16px;
  spacing: 6px;
}
.run-dialog-completion-box {
  padding-left: 15px;
}
.run-dialog-entry {
    @extend %dialog-entry-shared;
}
.run-dialog {
  border-radius: $corner-radius;
  padding: 16px 20px;
}
// this is an full screen overlay that is displayed with any cinnamon OSD or modal dialog which needs to always be semi transparent
.lightbox {
  background-color: $scrim-alt;
}
// removable media dialogs
.cinnamon-mount-operation-icon {
  icon-size: 4.8em;
}
.mount-password-reask {
  color: $warning;
}
.show-processes-dialog {
  spacing: 24px;
}
.mount-question-dialog {
  spacing: 24px;
}
.show-processes-dialog-subject {
  @extend %dialogs-subject-shared;

  &:rtl {
    @extend %dialogs-subject-rtl-shared;
  }
}
.mount-question-dialog-subject {
  @extend %dialogs-subject-shared;

  &:rtl {
    @extend %dialogs-subject-rtl-shared;
  }
}
.show-processes-dialog-description {
  @extend %dialogs-description-shared;

  &:rtl {
    padding-right: 17px;
  }
}
.mount-question-dialog-description {
  @extend %dialogs-description-shared;

  &:rtl {
    padding-right: 17px;
  }
}
.show-processes-dialog-app-list {
  max-height: 200px;
  padding-top: 24px;
  padding-left: 49px;
  padding-right: 32px;
  &:rtl {
    padding-right: 49px;
    padding-left: 32px;
  }
}
.show-processes-dialog-app-list-item {
  color: $on-surface;
  &:hover {
    color: $on-surface;
  }
  &:ltr {
    padding-right: 1em;
  }
  &:rtl {
    padding-left: 1em;
  }
}
.show-processes-dialog-app-list-item-icon {
  &:ltr {
    padding-right: 17px;
  }
  &:rtl {
    padding-left: 17px;
  }
}
.show-processes-dialog-app-list-item-name {
}
// desktop zoom feature
.magnifier-zoom-region {
  border: 3px solid divider($on-surface);
  &.full-screen {
    border-width: 0;
  }
}
// on screen keyboard
#keyboard {
  background-color: $scrim;
}
.keyboard-key {
  @extend %icon-button-shared;
  @include type(button);
}
.keyboard-layout {
  spacing: 8px;
  padding: 8px;
}
.keyboard-row {
  spacing: 16px;
}
.keyboard-subkeys { //long press on a key popup
  color: inherit;
  padding: 5px;
  -arrow-border-radius: 0;
  -arrow-background-color: transparent;
  -arrow-border-width: 0;
  -arrow-border-color: transparent;
  -arrow-base: 0;
  -arrow-rise: 0;
  -boxpointer-gap: 5px;
  background-color: $background;
  border-radius: $corner-radius;
  box-shadow: $shadow-2;
}
// main menu applet
.menu-favorites-box {
  padding: 8px;
}
.menu-favorites-button {
  padding: 0.4em 4px;
  &:hover {
     background-color: divider($on-surface);
     border-radius: $corner-radius;
     color: $on-surface;
  }
}
.menu-categories-box {
  padding: 8px;
}
.menu-applications-inner-box {
  padding: 8px;
}
.menu-applications-outer-box {
  padding: 8px;
  border-radius: $corner-radius;
}
.menu-application-button {
  padding: 0.4em 4px;
  &:highlighted {
    font-weight: bold;
  }
}
.menu-application-button-selected {
  padding: 0.4em 4px;
  background-color: divider($on-surface);
  border-radius: $corner-radius;
  color: $on-surface;
  &:highlighted {
    font-weight: bold;
  }
}
.menu-application-button-label {
  @extend %menu-button-label-shared;
}
.menu-category-button {
	padding: 0.4em 4px;
}
.menu-category-button-greyed {
  padding: 0.4em 4px;
  color: hint($on-surface);
  font-style: italic;
}
.menu-category-button-selected {
  padding: 0.4em 4px;
  background-color: divider($on-surface);
  border-radius: $corner-radius;
  color: $on-surface;
  &:hover {
  }
}
.menu-category-button-label {
  @extend %menu-button-label-shared;
}
// in the stock menu app descriptions are shown at the base of the menu
.menu-selected-app-box {
  padding: 8px;
  margin-bottom: 4px;
  text-align: right;
  &:rtl {
    text-align: left;
  }
}
.menu-selected-app-title {
  @include type(caption);
}
.menu-selected-app-description {
  @include type(caption);

  max-width: 150px;
}
// the menus search box
.menu-search-box {
  &:ltr {
    padding-left: 30px;
    padding-bottom: 5px;
    padding-top: 5px;
  }
  &:rtl {
    padding-right: 30px;
    padding-bottom: 5px;
    padding-top: 5px;
  }
}
#menu-search-entry {
  @extend %dialog-entry-shared;
}
.menu-search-entry-icon {
  icon-size: 1em;
  padding: 0 0;
  color: disabled($on-surface);
}
// the window list applet. Some third party applets inherit some of this theming.
.window-list-box {
  @include type(caption);
  
  spacing: 4px;
  padding: 0 3px;
  &.vertical {
    spacing: 4px;
    padding: 3px 0;
  }
  #appMenuIcon {
  }
  &:highlight {
    background: stroke($on-titlebar);
    color: $on-titlebar;
    }
}
.window-list-item-label {
}
// progress was added with cinnamon 3.6 and allows compatible applications to use the window list as a progress bar
.window-list-item-box {
  background-color: rgba(0, 0, 0, 0.01);
  transition-duration: $duration;
  &:hover {
    color: $on-titlebar;
  }
  &:active, &:checked, &:focus {
    background-color: stroke($on-titlebar);
    color: $on-titlebar;
    &:hover {
      color: $on-titlebar;
    }
  }
  .progress {
    background-color: $success;
  }
}
.window-list-item-box.top StLabel, .window-list-item-box.bottom StLabel {
  padding-left: 3px;
}
.window-list-item-demands-attention {
  background-color: $titlebar;
  color: hint($on-titlebar);
}
// cinnamon 3.8 will support an improved window-list-thumbnail preview which now has it's own selector
.window-list-preview {
  background-color: $surface;
  border-radius: $corner-radius;
  padding: 10px 15px;
  spacing: 1em;
  color: $on-surface;
  box-shadow: $shadow-4;
}
// Cinnamon 4.0 has a new grouped window list applet with it's own selectors.
// Initial theme support is defined here. Some theming is defined in the panel orientation specific section above.
.grouped-window-list {
  &-thumbnail-label {
    padding-left: 3px;
    padding-bottom: 6px;
  }
  &-number-label {
    @include type(caption);
    
    z-index: 99;
  }
  &-list-button-label {
    padding-left: 3px;
  }
  &-badge {
    border-radius: $circular-radius;
    background-color: $panel-solid; 
  }
  &-thumbnail-alert {
    background: $warning;
  }
  &-item-box {
    background-color: rgba(0, 0, 0, 0.01);
    transition-duration: $duration;
    &:hover {
      color: $on-titlebar;
    }
    &:active, &:checked {
      background-color: divider($on-titlebar);
      &:hover {
        color: $on-titlebar;
      }
    }
    &:focus {
      background-color: stroke($on-titlebar);
      color: $on-titlebar;
      &:hover {
        color: $on-titlebar;
      }
    }
    .progress {
      background-color: $success;
    }
  }
  &-item-demands-attention {
    background-color: $titlebar;
    color: hint($on-titlebar);
  }
  &-thumbnail-menu {
    padding: 20px;
    border: none;
    border-radius: $corner-radius;
    color: hint($on-titlebar);
    background: none;
    .item-box {
      padding: 8px;
      spacing: 2px;
      border-radius: $corner-radius;
       &:outlined {
         border: 2px solid divider($on-surface);
         color: $on-titlebar;
       }
       &:selected {
         background: divider($on-titlebar);
         color: $on-titlebar;
       }
       > StBoxLayout { // icon and title
        &:ltr { margin: 1px 0 0 6px; }
        &:rtl { margin: 1px 6px 0 0; }

        StLabel { padding-bottom: 2px; }
      }

      > StButton { // close button
        &:ltr { margin: 1px 6px 0 0; }
        &:rtl { margin: 1px 0 0 6px; }
      }
    }
    .thumbnail-box {
      padding: 2px;
    }
    .thumbnail {
      width: 256px;
    }
    .separator {
      width: 1px;
      background: divider($on-surface);
    }
  }
}
// the sound player applet
.sound-player {
  StButton {
    @extend %icon-button-shared;

    &:small {
      min-width: $small-size;
      min-height: $small-size;
      padding: 4px;
      StIcon {
        icon-size: 1em;
      }
    }
    StIcon {
      icon-size: 1.5em;
    }
  }
  .slider {
    @extend %slider-shared;

    height: 5px;
  }
  StBoxLayout {
    spacing: 0.5em;
  }
  > StBoxLayout {
    padding: 5px;
  }
}
.sound-player-generic-coverart {
  background: rgba(0,0,0,0.2);
}
.sound-player-overlay {
  background-color: $surface;
  min-width: 300px;
  padding: 12px 16px;
  spacing: 0.5em;
  color: hint($on-surface);
}
// workspace switcher applet simple button view
.workspace-button {
  background-color: $panel-solid;
  width: 2em;
  height: 1em;
  color: hint($on-titlebar);
  margin: 2px;
  &:outlined {
    background-color: stroke($on-titlebar);
    color: $on-titlebar;
  }
}
// workspace switcher applet graph view
.workspace-graph {
   background-color: $scrim;
  .workspace {
    background-color: $panel-solid;
    border: 1px solid divider($on-surface);
    &:active {
      background-color: stroke($on-titlebar);

      border: 1px solid divider($on-surface);
      .windows {
        -active-window-background: rgba(255, 255, 255, 0.8);
        -active-window-border: rgba(0, 0, 0, 0.9);
        -inactive-window-background: rgba(140, 140, 140, 0.8);
        -inactive-window-border: rgba(0, 0, 0, 0.7);
      }
    }
    .windows {
      -active-window-background: rgba(140, 140, 140, 0.8);
      -active-window-border: rgba(0, 0, 0, 0.7);
      -inactive-window-background: rgba(140, 140, 140, 0.8);
      -inactive-window-border: rgba(0, 0, 0, 0.7);
    }
  }
}
// most panel launcher themeing is orientation specific
.panel-launchers {
  padding: 0 4px;
  spacing: 4px;
  transition-duration: $duration;
  .launcher {
    background-color:rgba(0, 0, 0, 0.01);
  }
  &.vertical {
    padding: 4px 0;
    spacing: 4px;
    .launcher .icon-box {
      padding-top: 0;
    }
  }
}
// applets in general
.applet-separator-line, .applet-separator-line-vertical {
  width: 2px;
  background: divider($on-titlebar);
}
.applet-spacer:highlight {
  background: highlight($surface);
}
.applet-box {
  background-color: rgba(0, 0, 0, 0.01);
  color: hint($on-titlebar);
  transition-duration: $duration;
  &:checked {
    color: $on-titlebar;
    .applet-label {
      color: $on-titlebar;
    }
  }
  &:hover {
    color: $on-titlebar;
    .applet-label {
      color: $on-titlebar;
    }
  }
  &:highlight {
    background: stroke($on-titlebar);
    color: $on-titlebar;
    .applet-label {
      color: $on-titlebar;
    }
  }
}
.applet-label {
  @include type(subtitle2);

  color: hint($on-titlebar);
}
// icon-size set to 22 to match hard-coded menu icon size - applet-icon style is used for search provider results in menu
.applet-icon {
  color: hint($on-titlebar);
  padding: 0;
  spacing: 0;
  icon-size: 22px;
}
// desklets - the base .desklet selector is for 'undecorated' desklets however some subtle background themeing is desirable
// to maintain visibility irrespctive of wallpaper and to allow for the highlighting scheme to work
.desklet {
  @include type(caption);
  
  color: $on-titlebar;
  border: none;
  box-shadow: $shadow-4;
  padding: 12px;
  background-color: $scrim-alt;
  border-radius: $corner-radius
}
// these do not inherit from .desklet
.desklet-with-borders {
  @extend %desklet-shared;
  @include type(caption);

  background-color: $surface;
  border-radius: $corner-radius;
  &:highlight {
    background-color: highlight($surface);
  }
}
.desklet-with-borders-and-header {
  @extend %desklet-shared;
  @include type(caption);
  
  background-color: $surface;
  border-radius-bottomleft: 2px;
  border-radius-bottomright: 2px;
  &:highlight {
    background-color: highlight($surface);
  }
}
.desklet-header {
  @include type(headline6);
  @extend %desklet-shared;

  background-color: $surface;
  border-radius-topleft: 2px;
  border-radius-topright: 2px;
  &:highlight {
    background-color: highlight($surface);
  }
}
.photoframe-box {
  @extend %desklet-shared;
  
  background-color: $surface;
  border-radius: $corner-radius;
  &:highlight {
    background-color: highlight($surface);
  }
}
.desklet-drag-placeholder {
  border: 2px solid $primary;
  background-color: $scrim-alt;
  border-radius: $corner-radius;
}
.launcher {
  padding: 1px;
  .icon-box {
    padding-top: 2px;
  }
}
// applet 'about' OSDs - inherits from modal dialogs
.about-content {
  min-width: 250px;
  min-height: 150px;
  spacing: 8px;
  padding-bottom: 16px;
}
.about-title {
  @include type(headline6);
}
.about-uuid {
  @include type(caption);
}
.about-icon {
  padding-right: 20px;
}
.about-scrollBox {
  border: 1px solid divider($on-surface);
  border-radius: $corner-radius;
}
.about-scrollBox-innerBox {
  padding: 1.2em;
  spacing: 1.2em;
}
.about-description {
  padding-top: 4px;
}
.about-version {
  padding-left: 7px;
}
.workspace-osd {
  @extend %osd-info-workspace-shared;  
}
.expo-workspaces-name-entry {
  @include type(body1);

  background-color: entry-fill($on-dark);
  color: $on-dark;
  padding: 0 8px;
  selection-background-color: stroke($on-dark);
  selected-color: $on-dark;
  caret-color: $on-dark;
  text-align: center;
  height: $medium-size;
  border-radius: $corner-radius $corner-radius 0 0;
  -cinnamon-caption-spacing: 12px;
  &#selected {
    color: $on-dark;
    background-color: stroke($on-dark);
  }
  &:focus {
    color: $on-dark;
    box-shadow: inset 0 -2px $on-dark;
  }
  &:hover {
    background-color: divider($on-dark);
  }
}
.notification-applet-padding {
  padding: .5em 1em;
}
.notification-applet-container {
  max-height: 100px;
}
.check-box {
  CinnamonGenericContainer {
    spacing: 8px;
  }
  StBin {
    @extend %check-box-shared;
  }
  &:focus {
    StBin {
      @extend %check-box-shared;
    }
    &:checked StBin {
      background-image: url(assets/checkbox.svg);
    }
  }
  StLabel {
  }
  &:checked StBin {
    background-image: url(assets/checkbox.svg);
  }
}
.radiobutton {
  CinnamonGenericContainer {
    spacing: 8px;
  }
  StBin {
    @extend %radiobutton-shared;
  }
  &:focus {
    StBin {
      @extend %radiobutton-shared;
    }
    &:checked StBin {
      background-image: url(assets/radiobutton.svg);
    }
  }
  StLabel {
  }
  &:checked StBin {
    background-image: url(assets/radiobutton.svg);
  }
}
.flashspot {
  background-color: $primary;
}
// displayed when media keys are pressed.
.osd-window {
  @extend %osd-panel-shared;

  spacing: 1em;
  padding: 16px;
  .level {
    height: 0.7em;
    border-radius: 0.3em;
    background-color: stroke($on-surface);
  }
  .level-bar {
    border-radius: 0.3em;
    background-color: $primary;
  }
}
// on screen preview of windows tiling placement
.tile-preview {
  @extend %tile-shared;

  &.snap {
    @extend %tile-shared-snap;
  }
}
.tile-hud {
  @extend %tile-shared;

  &.snap {
    @extend %tile-shared-snap;
  }
  &:top {
    border-top-width: 0;

    border-radius: 0 0 10px 10px;
  }
  &:bottom {
    border-bottom-width: 0;

    border-radius: $corner-radius $corner-radius 0 0;
  }
  &:left {
    border-left-width: 0;

    border-radius: 0 10px 10px 0;
  }
  &:right {
    border-right-width: 0;

    border-radius: 10px 0 0 10px;
  }
  &:top-left {
    border-top-width: 0;
    border-left-width: 0;

    border-radius: 0 0 10px 0;
  }
  &:top-right {
    border-top-width: 0;
    border-right-width: 0;

    border-radius: 0 0 0 10px;
  }
  &:bottom-left {
    border-bottom-width: 0;
    border-left-width: 0;

    border-radius: 0 10px 0 0;
  }
  &:bottom-right {
    border-bottom-width: 0;
    border-right-width: 0;

    border-radius: 10px 0 0 0;
  }
}
.systray {
  spacing: 4px;
}
// user-applet specific themeing - overrides applet stylesheet
.user-box {
  padding: 0.4em 1.3em;
  spacing: 10px;
}
.user-icon {
  padding: 4px;
  border: none;
}
.user-label {
  @include type(subtitle2);
  
  color: $on-surface;
}
